package com.baicaoyuan.web.repository;

import com.baicaoyuan.web.model.LotteryScoreInputDetailDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface LotteryScoreInputDetailRepository extends JpaRepository<LotteryScoreInputDetailDO, Long> {
    @Query(value = "SELECT * from t_lottery_score_input_detail lu where lu.period_no like ?1 order by lu.create_time DESC LIMIT ?2, ?3 ", nativeQuery = true)
    List<LotteryScoreInputDetailDO> getPage(String periodNo, Integer page, Integer size);

    @Query(value = "SELECT count(*) from t_lottery_score_input_detail l where l.period_no like ?1  ", nativeQuery = true)
    Integer count(String periodNo);
}